package com.megaspacevr.utils;


import com.megaspacevr.entity.Result;
import com.megaspacevr.entity.ResultEnum;

public class ResultUtil {


    public static <T> Result<T> success(T data) {
        Result result = new Result();
        result.setCode(ResultEnum.SUCCESS).setData(data);
        return result;
    }

    public static <T> Result<T> fail(String msg) {
        Result result = new Result();
        result.setCode(ResultEnum.FAIL).setMsg(msg);
        return result;
    }


}